package demo.bit.com;

public class Test1 {

    public static void showShape(Shape shape) {
        shape.show();
    }

    public static void main(String[] args) {
        /*Test1.showShape(new circle());
        Test1.showShape(new Square());
        Test1.showShape(new Shape());*/

        /*Shape[] shapes = new Shape[3];
        shapes[0] = new circle();
        shapes[1] = new Shape();
        shapes[2] = new Square();*/

        Shape[] shapes = {new circle(),new Square(),new Shape()};

        for (Shape s : shapes) {
            Test1.showShape(s);
        }

    }

    public static void main1(String[] args) {
        Shape shape = new circle();
        shape.show();
        Shape shape1 = new Square();
        shape1.show();


    }
}
